<?php

namespace app\components;


class FileJob implements \yii\queue\JobInterface{

    public $data = null;

    public function __construct($data){
        $this->data = $data;
    }

    public function execute($queue){

        $file = $this->data["file"];
        $content = $this->data["content"];

        file_put_contents($file, $content."\n", FILE_APPEND);
    }
}